{% extends "base_for_react.html" %}
{% load render_bundle from webpack_loader %}
{% block extra_style %}
{% render_bundle 'wiki' 'css' %}
{% endblock %}

{% block extra_script %}
<script type="text/javascript">
    window.wiki = {
        config: {
            slug: "{{ wiki.slug }}",
            repoId: "{{ wiki.repo_id }}",
            sharedToken: "{{ shared_token }}",
            sharedType: "{{ shared_type }}",
            initial_path: "{{ file_path|escapejs }}",
            permission: "{{ user_can_write }}",
            isPublicWiki: "{{ is_public_wiki }}",
            isDir: "{{ is_dir }}",
            hasIndex: {% if has_index %} true {% else %} false {% endif %},
        }
    };
</script>

{% render_bundle 'wiki' 'js' %}
{% endblock %}
